﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


public class Food : IComparable
{
    private string name;
    private int price;

    public Food(string name, int cost)
    {
        this.name = name;
        this.price = cost;
    }

    public string Name
    {
        get { return this.name; }
        set { this.name = value; }
    }
    public int Price
    {
        get { return this.price; }
        set { this.price = value; }
    }

    public int CompareTo(object other)
    {
        if (other is Food)
            return this.name.CompareTo(((Food)other).name);
        else throw new ArgumentException("Argument is not a Food.");
    }
}
